#ifndef CAFFEINE_GRAPHICS_SPRITE_HPP
#define CAFFEINE_GRAPHICS_SPRITE_HPP

#include "Common.hpp"
#include "Graphics/Colour.hpp"
#include "Math/Vector.hpp"

#include "SFML/Graphics/Sprite.hpp"

#include <list>
#include <string>

namespace sf
{
	class RenderWindow;
}

namespace Entity
{
	class IEntity;
}

namespace Graphics
{
	class ISprite
	{
	public:
		ISprite( Entity::IEntity *setEnt );
		virtual ~ISprite( void );

		virtual void Draw( void );
		virtual void Remove( void );

		virtual void LoadImage( const std::string path );

		virtual void FlipX( const bool flipX );
		virtual void FlipY( const bool flipY );

		virtual Math::Vectorf GetPosition( void ) const;
		virtual void SetPosition( const Math::Vectorf &pos );

		virtual float GetAngle( void ) const;
		virtual void SetAngle( const float angle );

		virtual Math::Vectorf GetSize( void ) const;
		virtual void SetSize( const Math::Vectorf &size );

		virtual Colour GetColour( void ) const;
		virtual void SetColour( const Colour &col );

		virtual bool GetVisible( void ) const;
		virtual void SetVisible( const bool vis );

		static void DrawAll( void );
	private:
		Entity::IEntity *ent;
		sf::Sprite sprite;
		sf::RenderWindow *renderWnd;
		bool visible;

		static std::list< ISprite * > spriteList;
	};
}

#endif //CAFFEINE_GRAPHICS_SPRITE_HPP